import SwiftUI

/*
 * 单选按钮示例
 */
class RadioButtonExample: FCUIView{
    /*
     * 初始化布局
     */
    override func onLoad(){
        let isInit = super.m_isInit;
        super.onLoad();
        if !isInit{
            m_paint.defaultUIStyle = "light"
            let width = Double(self.frame.size.width), height = Double(self.frame.size.height)
            renderFaceCat(name:"radiobuttonexample", paint: m_paint, size: FCSize(cx:width, cy:height))
            //获取第二页
            let tabPage = findViewByName(name:"TabPage2", views:m_paint.views);
            let radioButton = FCRadioButton()
            radioButton.location = FCPoint(x:100, y:100)
            radioButton.size = FCSize(cx:100, cy:20)
            addViewToParent(view:radioButton, parent:tabPage)
            radioButton.text = "选项"
        }
    }
}
